package com.neusoft.elmboot.mapper;

import java.math.BigDecimal;
import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.neusoft.elmboot.po.Record;

@Mapper
public interface TransactionMapper {
	
	@Insert("insert into transaction values(null,now(),#{amount},#{type},#{walletId})")
	int saveTrans(BigDecimal amount,int type,Long walletId);
	
	@Select("select * from transaction where walletId=#{walletId} order by date desc")
	List<Record> getTransBywalletId(Long walletId);
}
